import request from '@/utils/request'

export function findUserDept(data) {
  return request({
    url: '/findUserDeptByUserId',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}

export function findRolesByUser1(data) {
  return request({
    url: '/findRolesByUser',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}

export function findUserDept2(data) {
  return request({
    url: '/findRolesByUserId2',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}

export function setRoleToUser2(data) {
  return request({
    url: '/setRoleToUser2',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}
export function queryTreeList(data) {
  return request({
    url: '/getHosTreeList',
    method: 'get',
    params: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}

export function queryUser1(data) {
  return request({
    url: '/users1',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}

export function queryHospitalId(data) {
  return request({
    url: '/hospitalId',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}

export function postRegister1(data) {
  return request({
    url: '/register1',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}

export function postUpdateAppUserG(data) {
  return request({
    url: '/updateAppUserG',
    method: 'put',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}

export function postResetPassword2(data) {
  return request({
    url: '/resetPassword2',
    method: 'put',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}

export function setDeptToUser(data) {
  return request({
    url: '/setDeptToUser',
    method: 'put',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA
  })
}
